import request from '@/plugin/axios'

// 获取司机列表和搜索
export function getDriverList (data) {
    return request({
        url: '/driver',
        method: 'post',
        data
    })
}
//保存未提交的新建司机信息
export function saveDriver (data) {
    return request({
        url: '/driver/save',
        method: 'post',
        data
    })
}
//更新保存的未提交的司机信息
export function updateSavedDriver (data) {
    return request({
        url: '/driver/submit',
        method: 'post',
        data
    })
}

//提交司机基本信息
export function submitDriver (data) {
    return request({
        url: '/driver/submit',
        method: 'post',
        data
    })
}
//删除司机信息
export function delDriver (data) {
    console.log('del',data)
    return request({
        url: '/driver/del/'+data.driverID,
        method: 'post',
        data
    })
}

//更新已提交司机信息
export function upadteSubmitedDriver (data) {
    return request({
        url: '/driver/submit/update',
        method: 'post',
        data
    })
}

//提交司机附加信息
export function submitDriverExtra (data) {
    return request({
        url: '/driverextra/submit',
        method: 'post',
        data
    })
}
//保存司机附加信息
export function saveDriverExtra (data) {
    return request({
        url: '/driverextra/save',
        method: 'post',
        data
    })
}
